%设定字体

%% \setCJKmainfont[ItalicFont=STKaiti]{Source Han Serif CN}
%% \textbf为思源宋体

%\setCJKmainfont[BoldFont=黑体, ItalicFont=STKaiti]{Source Han Serif CN}
%% \textbf为中易黑体

%% \setCJKsansfont{Source Han Sans CN}
%% \setCJKmonofont{Source Han Sans CN}
%% \setCJKfamilyfont{boldsong}{Source Han Serif CN Heavy}
\normalspacedchars{*}
%数学式
\usepackage{mathtools,extarrows,amsfonts,amssymb,bm,mathrsfs} %数学式宏包, 更多箭头, 黑板体等数学字体,leqslant等符号
\usepackage{amsthm} %定理环境

\DeclareMathOperator{\rad}{rad}
\DeclareMathOperator{\diam}{diam}
\DeclareMathOperator{\fin}{fin}
\DeclareMathOperator{\esssup}{ess\,sup}
\DeclareMathOperator{\conv}{Conv}
\DeclareMathOperator{\Span}{span} %% 因为\span已经在宏中定义, 这里使用大写的\Span来表示线性张成
\DeclareMathOperator{\cont}{Cont} %% 表示函数的连续点
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\codim}{codim}
\DeclareMathOperator{\convba}{Convba}


\newcommand{\me}{\ensuremath{\mathrm{e}}}
\newcommand{\imag}{\mathrm{i}}
\newcommand{\Star}[1]{#1^{*}}
\newcommand{\1}{\mathds{1}}
\newcommand{\supp}{\mathrm{supp}\,}

%% \C已被定义, 重定义在交叉引用部分
\newcommand{\C}{\ensuremath{\mathbb{C}}} 
\newcommand{\R}{\ensuremath{\mathbb{R}}}
\newcommand{\J}{\ensuremath{\mathbb{J}}}
\newcommand{\Q}{\ensuremath{\mathbb{Q}}}
\newcommand{\Z}{\ensuremath{\mathbb{Z}}}
\newcommand{\N}{\ensuremath{\mathbb{N}}}
\newcommand{\K}{\ensuremath{\mathbb{K}}}
\newcommand{\Zo}{\ensuremath{\mathbb{Z}_{\geqslant 0}}} % 非负整数集
\newcommand{\Zi}{\ensuremath{\mathbb{Z}_{\geqslant 1}}} % 正整数集
\newcommand{\id}{\mathrm{id}}
\newcommand{\im}{\mathrm{im}\,}                         % 映射的像

\newcommand{\CA}{\mathcal{A}}
\newcommand{\CB}{\mathcal{B}}
\newcommand{\CF}{\mathcal{F}}
\newcommand{\CG}{\mathcal{G}}
\newcommand{\CH}{\mathcal{H}}
\newcommand{\CK}{\mathcal{K}}
\newcommand{\CL}{\mathcal{L}}
\newcommand{\CN}{\mathcal{N}}

\newcommand{\FB}{\mathfrak{B}}

\renewcommand{\Re}{\mathrm{Re\,}}
\renewcommand{\Im}{\mathrm{Im\,}}
\newcommand{\sgn}{\mathrm{sgn}\,}
\newcommand{\diff}{\,\mathrm{d}}

\newcommand{\Fs}{\ensuremath{\CF_{\sigma}}}
\newcommand{\Gd}{\ensuremath{\CG_{\delta}}}
\newcommand{\Fr}{\ensuremath{\CF_{r}}}


\usepackage{tasks}
\NewTasks[counter-format=(tsk[1]), item-indent=2em, label-offset=1em, label-align=right]{lpbn}
\NewTasks[counter-format=(tsk[a]), item-indent=2em, label-offset=1em]{alpbn}
\NewTasks[counter-format=tsk[A].]{xrze}[*]

%版式
\usepackage[a4paper,left=2.5cm,right=2.5cm,top=2.5cm,bottom=2cm]{geometry} %边距
%\usepackage[a4paper,left=1.8cm,right=3.2cm,top=2.5cm,bottom=2cm]{geometry} %当打印时使用此选项
\setlength{\headheight}{13pt}
\usepackage{pifont}		% 带圈数字
\usepackage{fancyhdr} 	% 页眉页脚
\pagestyle{fancy}
\fancyhf{}
\fancyhead[OL]{\fangsong \nouppercase\rightmark}
\fancyhead[ER]{\fangsong \nouppercase\leftmark}
\fancyhead[OR,EL]{\thepage}
\fancyfoot[C]{}
\usepackage{tocbibind}
\usepackage{imakeidx}

%辅助
\usepackage{array,diagbox,booktabs,tabularx} 
%数组环境, 表格中可以添加对角线, 可以调整表格中线的宽度, 可以控制表格宽度并使其自动换行
%\usepackage{enumerate} %列表环境
\usepackage[shortlabels]{enumitem} % 继承并扩展了enumerate宏包的功能
\setlist[1]{left=\parindent..0pt}
\setlist{noitemsep, itemindent=2\parindent}



%交叉引用
\usepackage{nameref}
\usepackage{prettyref}
\usepackage[colorlinks, linkcolor=Sumire]{hyperref}
\usepackage{graphicx}
%浮动体
\usepackage{caption} %使用浮动体标题
\usepackage{subfig} %子浮动体

% 新定义计数器
\newcounter{FA}[section]
\renewcommand{\theFA}{\thesection.\arabic{FA}}

%新定义定理环境类型
\newtheoremstyle{normal}% name
{3pt}% Space above
{3pt}% Space below
{}% Body font
{2\ccwd}% Indent amount
{\bfseries}% Theorem head font
{}% Punctuation after theorem head
{1\ccwd}% Space after theorem head
{}% Theorem head spec (can be left empty, meaning `normal' )
\newtheoremstyle{Thm}% hnamei
{3pt}% Space above
{3pt}% Space below
{\kaishu}% Body font
{2\ccwd}% Indent amount
{\bfseries}% Theorem head font
{}% Punctuation after theorem head
{1\ccwd}% Space after theorem head
{}% Theorem head spec (can be left empty, meaning `normal' )

%新定义定理环境
\theoremstyle{normal}
%\theoremstyle{Thm}
\newtheorem{Theorem}[FA]{定理}
\newtheorem{Theoremn}{定理}
\renewcommand{\theTheoremn}{\theFA$'$}
\newtheorem{Lemma}[FA]{引理}
\newtheorem*{Proof}{证明}
\newtheorem{Remark}[FA]{注}
\newtheorem*{Solution}{解}
\newtheorem{Definition}[FA]{定义}
\newtheorem{Definitionn}{定义}
\renewcommand{\theDefinitionn}{\thefA$'$}
\newtheorem{Corollary}[FA]{推论}
\newtheorem{Example}[FA]{例}
\newtheorem{Proposition}[FA]{命题}
\newtheorem{ExtraExample}{补充题}

%新定义命令
\newcommand{\abs}[1]{\ensuremath{\left| #1 \right| }}
\newcommand{\norm}[1]{\ensuremath{\left\| #1 \right\|}}
\newcommand{\tabs}[1]{\ensuremath{\lvert #1\rvert}}
\newcommand{\tnorm}[1]{\ensuremath{\lVert #1\rVert}}
\newcommand{\Babs}[1]{\ensuremath{\Big| #1 \Big| }}
\newcommand{\Bnorm}[1]{\ensuremath{\Big\| #1 \Big\|}}
\newcommand{\lrangle}[1]{\left\langle #1 \right\rangle}
\newcommand{\degree}{\ensuremath{^{\circ}}}
\newcommand{\sm}{\ensuremath{\setminus}}
\newcommand{\baro}[1]{\overline{#1}}
\newcommand{\weakto}{\ensuremath{\overset{w.}{\longrightarrow}}}
\newcommand{\sweakto}{\ensuremath{\overset{\Star{w.}}{\longrightarrow}}}
\newcommand{\seq}[2][n]{\ensuremath{#2_{1}, #2_{2}, \dots, #2_{#1}}}
\renewcommand{\thefootnote}{$\sharp$\arabic{footnote}}
%\renewcommand{\labelenumi}{(\theenumi)}